package com.funmi.lizip.mapper;

import com.funmi.lizip.entity.Camera;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yeyg
 * @since 2022-11-02
 */
//@Repository
public interface CameraMapper extends BaseMapper<Camera> {

    @Select("select * from camera")
    List<Camera> getAll();

    @Select("select id, area, lon, lat, alt from camera")
    List<Camera> getPositions();

    @Select("select id, area, lon, lat, alt, point_no, participant, work_type, `status`, battery, temper, plant_type from camera where id = #{id}")
    Camera getById(int id);
}
